using System;
using System.Collections.Generic;


namespace Gfw.Models.Stock
{
	[Serializable]
	public partial class StkSplit: IEquatable<StkSplit>
	{

		#region Private Members

		private string _id; 
		private string _userid; 
		private decimal _splittimes; 
		private decimal _splitpricebefore; 
		private decimal _splitpriceafter; 
		private decimal _splitcountbefore; 
		private decimal _splitcountafter; 
		private DateTime? _splitdate; 
		private string _splitinformation; 		
		#endregion

		#region Constructor

		public StkSplit()
		{
			_id = String.Empty; 
			_userid = String.Empty; 
			_splittimes = 0; 
			_splitpricebefore = 0; 
			_splitpriceafter = 0; 
			_splitcountbefore = 0; 
			_splitcountafter = 0; 
			_splitdate = null; 
			_splitinformation = String.Empty; 
		}
		#endregion // End of Default ( Empty ) Class Constuctor

		#region Public Properties
			
		public virtual string Id
		{
			get
			{ 
				return _id;
			}

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for Id", value, "null");
				
				if(  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for Id", value, value.ToString());
				
				_id = value;
			}
		}
			
		public virtual string Userid
		{
			get
			{ 
				return _userid;
			}

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for Userid", value, "null");
				
				if(  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for Userid", value, value.ToString());
				
				_userid = value;
			}
		}
			
		public virtual decimal SplitTimes
		{
			get
			{ 
				return _splittimes;
			}
			set
			{
				_splittimes = value;
			}

		}
			
		public virtual decimal SplitPriceBefore
		{
			get
			{ 
				return _splitpricebefore;
			}
			set
			{
				_splitpricebefore = value;
			}

		}
			
		public virtual decimal SplitPriceAfter
		{
			get
			{ 
				return _splitpriceafter;
			}
			set
			{
				_splitpriceafter = value;
			}

		}
			
		public virtual decimal SplitCountBefore
		{
			get
			{ 
				return _splitcountbefore;
			}
			set
			{
				_splitcountbefore = value;
			}

		}
			
		public virtual decimal SplitCountAfter
		{
			get
			{ 
				return _splitcountafter;
			}
			set
			{
				_splitcountafter = value;
			}

		}
			
		public virtual DateTime? SplitDate
		{
			get
			{ 
				return _splitdate;
			}
			set
			{
				_splitdate = value;
			}

		}
			
		public virtual string SplitInformation
		{
			get
			{ 
				return _splitinformation;
			}

			set	
			{	
				if(  value != null &&  value.Length > 2000)
					throw new ArgumentOutOfRangeException("Invalid value for SplitInformation", value, value.ToString());
				
				_splitinformation = value;
			}
		}
			
				
		#endregion 

		#region Public Functions

		#endregion //Public Functions

		#region IEquatable members

		public virtual bool Equals(StkSplit other)
		{
			if (other == this)
				return true;
		
			return ( other != null ) &&
				( this._id == other.Id );
				   
		}

		#endregion
		
	}
}
